package edu.sctu.practice.class02.yangshengyu.one10;

import java.util.Scanner;

/**
 * Created by Cullen on 2015/8/4.
 */
public class N12 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        System.out.println("请输入一个数：");
        int a=input.nextInt();
        int i=(int)a;
        for (int j=2;j<=i;j++){
            if (a%j==0){
                System.out.println("此数为素数！");
                break;
            }else if (j>i){
                System.out.println("此数不为素数！");
            }
        }
        }
    }

